<textarea name="{{ WysiwygId|safe }}" id="{{ WysiwygId|safe }}" style="padding: 0; width: {{ WysiwygWidth|safe }}; height: {{ WysiwygHeight|safe }};">{{ WysiwygValue|safe }}</textarea>
<script type="text/javascript">
function {{ LoadFunctionName|safe }}()
{
	tinyMCE.init({
		// General options
		{{ ValidElements|safe }}
		mode : "exact",
		elements : "{{ WysiwygId|safe }}",
		theme : "advanced",
		skin : "o2k7",
		skin_variant : "silver",
		plugins : "safari,pagebreak,style,layer,table,save,interspireimg,linker,advlink,media,searchreplace,print,contextmenu,paste,fullscreen,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,mediaservice",

		// Theme options
		theme_advanced_buttons1 : "undo,redo,|,bold,italic,underline,formatselect,fontselect,fontsizeselect,justifyleft,justifycenter,justifyright,justifyfull,|,fullscreen",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,cleanup,|,bullist,numlist,|,outdent,indent,|,link,unlink,anchor,image,media,table,linker,mediaservice,|,forecolor,backcolor,|,pagebreak,|,code",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,
		extended_valid_elements : "iframe[src|width|height|name|align|frameborder|scrollingframeborder]",
		relative_urls : false,
		remove_script_host : false,
		shop_path: "{{ ShopPath|safe }}",
		document_base_url : "{{ ShopPath|safe }}",
		content_css : "{{ AppPath|safe }}/javascript/tinymce/themes/advanced/skins/o2k7/content.css",
		external_link_list_url : "{{ AppPath|safe }}/admin/remote.php?remoteSection=imagemanager&w=GetImagesList",
		external_image_list_url : "{{ AppPath|safe }}/admin/remote.php?remoteSection=imagemanager&w=GetImagesList",
		theme_advanced_resizing_use_cookie: false,

		jquery_include_url: '{{ AppPath|safe }}/javascript/jquery.js?{{ JSCacheToken }}',
		jquery_file_upload_include_url: '{{ AppPath|safe }}/javascript/jquery/plugins/ajax.file.upload.js?{{ JSCacheToken }}',
		image_upload_url: '{{ AppPath|safe }}/admin/remote.php?remoteSection=imagemanager&w=UploadImage',

		paste_retain_style_properties: 'font-family,font-size,color,background-color'
	});
}
{{ LoadFunction|safe }}
</script>
